from django.db import models
from datetime import datetime

# 在线相册模型
class Pictures(models.Model):
	'''在线相册模型类'''
	title = models.CharField(max_length=100)
	filename = models.CharField(max_length=50)
	createdate=models.DateTimeField(default=datetime.now)

	def __str__(self):
		'''在线相册信息输出格式'''
		return "%d: %s: %s"%(self.id,self.title,self.filename)

	class Meta:
		'''对应的表名：pictures'''
		db_table = "pictures"